//
//  ITThemeViewController.m
//  InduceTool
//
//  Created by 魏延龙 on 2020/9/2.
//  Copyright © 2020 魏延龙. All rights reserved.
//

#import "ITThemeViewController.h"
#import <LEETheme/LEETheme.h>

@interface ITThemeViewController ()

@end

@implementation ITThemeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
    [self setupViews];
    self.navigationController.navigationBar.lee_theme.LeeConfigBarTintColor(@"ident1");
    [LEETheme startTheme:@"gray"];
}

- (void)setupViews {
    UIButton *grayBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    [grayBtn setTitle:@"grayBtn" forState:UIControlStateNormal];
    grayBtn.frame = CGRectMake(50, 100, 88, 30);
    [self.view addSubview:grayBtn];
    [grayBtn addTarget:self action:@selector(grayBtnAction) forControlEvents:UIControlEventTouchUpInside];

    UIButton *greenBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    [greenBtn setTitle:@"greenBtn" forState:UIControlStateNormal];
    greenBtn.frame = CGRectMake(140, 100, 88, 30);
    [self.view addSubview:greenBtn];
    [greenBtn addTarget:self action:@selector(greenBtnAction) forControlEvents:UIControlEventTouchUpInside];

    UIButton *redBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    [redBtn setTitle:@"redBtn" forState:UIControlStateNormal];
    redBtn.frame = CGRectMake(230, 100, 88, 30);
    [self.view addSubview:redBtn];
    [redBtn addTarget:self action:@selector(redBtnAction) forControlEvents:UIControlEventTouchUpInside];
    
    
    UIView *view1 = [[UIView alloc] initWithFrame:CGRectMake(0, 140, 100, 100)];
    [self.view addSubview:view1];
//    view1.lee_theme.LeeAddBackgroundColor(@"gray", [UIColor grayColor]).LeeAddBackgroundColor(@"green", [UIColor greenColor]).LeeAddBackgroundColor(@"red", [UIColor redColor]);
    view1.lee_theme.LeeConfigBackgroundColor(@"ident1");
    
    UILabel *showLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 250, 300, 100)];
    [self.view addSubview:showLabel];
    showLabel.text = @"体会文字颜色过渡";
    
    showLabel.lee_theme.LeeConfigTextColor(@"textcolor");
    showLabel.lee_theme.LeeConfigBackgroundColor(@"ident1");
    
    
}

-(void)grayBtnAction {
    [LEETheme startTheme:@"gray"];
}
-(void)greenBtnAction {
    [LEETheme startTheme:@"green"];
}
-(void)redBtnAction {
    [LEETheme startTheme:@"red"];
}

@end
